{%  extends "base.html" %}

{% block site_name %}用户界面{% endblock %}
{% block header %}用户模式{% endblock %}
{% block left_body %}
        <ul class="nav flex-column nav-pills">
            <li class="nav-item">
                <a  class="nav-link active" href="/">转到主界面</a>
            </li>
          <li class="nav-item">
            <a class="nav-link" href="../">返回用户主界面</a>
          </li>
           <li class="nav-item">
            <a class="nav-link" href="/user/search">看看有没有其他书</a>
          </li>
        </ul>
{% endblock %}


{% block right_body %}
    <!--
<form role="form" action="borrow-check/" method="post">
    <div class="form-group">

        <label for="id">
            输入书号
        </label>
        <input type="text" class="form-control" name="id" />
    </div>
    <button type="submit" class="btn btn-primary">
        Submit
    </button>
</form>
    -->
    <h3 class="text-active text-center">这是已在借阅列表的图书</h3>

{% if target==None%}
    <h3 class="text-danger text-center">您似乎还没有添加图书</h3>
{% endif %}

{% if target!=None %}
    <table class="table table-bordered">
  <thead>
  <tr class="table-active">
      <th>ISBN</th>
      <th>书名</th>
      <th>类别</th>
      <th>作者</th>
      <th>出版社</th>
      <th>价格</th>
      <th>剩余数量</th>
  </tr>
  </thead>
{% for row in target %}
<tr class="table-success">
    <td>{{ row[0] }}</td>
    <td>{{ row[1] }}</td>
    <td>{{ row[3] }}</td>
    <td>{{ row[4] }}</td>
    <td>{{ row[5] }}</td>
    <td>{{ row[6] }}</td>
    <td>{{ row[7] }}</td>
</tr>
{% endfor %}
</table>

<form role="form" action="/user/borrow/act/" method="post">
    <div class="form-group">
        <label for="date">
            手动输入借书日期（因为这个如果自动日期，不便测试）
        </label>
        <input type="date" class="form-control" name="date" />
    </div>
    <button type="submit" class="btn btn-primary">
        确认借阅这些
    </button>
</form>

{% endif %}



{% endblock %}